cmake_minimum_required(VERSION 3.8)
project(write_append)
file(WRITE "${PROJECT_SOURCE_DIR}/WriteAppend.txt" "the quick brown fox jumps ")
file(READ "${PROJECT_SOURCE_DIR}/WriteAppend.txt" read_var)
message(STATUS "WRITE -> READ - ${read_var}")
file(APPEND "${PROJECT_SOURCE_DIR}/WriteAppend.txt" "over the lazy dog.")
file(READ "${PROJECT_SOURCE_DIR}/WriteAppend.txt" read_var)
message(STATUS "APPEND -> READ - ${read_var}")
